import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '*',
      redirect: '/'
    },
    {
      path: '/', // 登录
      name: 'Login',
      component: require('@/views/Login').default
    },
    {
      path: '/register', // 注册
      name: 'Register',
      component: require('@/views/Register').default
    },
    {
      path: '/home', // 主页面
      name: 'Home',
      component: require('@/views/Home').default
    },
    {
      path: '/personal', // 个人信息
      name: 'Personal',
      component: require('@/views/Personal').default
    },
    {
      path: '/personal-edit', // 个人信息编辑
      name: 'PersonalEdit',
      component: require('@/views/PersonalEdit').default
    },
    {
      path: '/add', // 添加页面
      name: 'Add',
      component: require('@/views/add').default
    }
  ]
})
